package com.canton.service.impl;
import com.canton.dao.entity.DiseaseNode;
import com.canton.dao.repository.DiseaseRepository;
import com.canton.service.DiseaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DiseaseServiceImpl implements DiseaseService {
    @Autowired
    private DiseaseRepository diseaseRepository;


    @Override
    public DiseaseNode findByName(String name) {
        return diseaseRepository.findByName(name);
    }

    @Override
    public List<DiseaseNode> findAll() {
        return diseaseRepository.findAll();
    }

    @Override
    public List<DiseaseNode> findByNameLike(String likes) {
        return diseaseRepository.findByNameLike(likes);
    }
}
